/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication1;

/**
 *
 * @author user
 */
public class bai13 {
    public static void main(String[] args) {
        System.out.println(timChuSODauTien(547268));
    }
    
    private static int timChuSODauTien(int n){
        if(n<10) return n;
        return timChuSODauTien(n/10);
    }
}
